import { DeleteDto, IndexDto, ShowDto } from '@libs/common/dto';
import { ApiProperty, PartialType } from '@nestjs/swagger';
import { IsBoolean, IsNotEmpty } from 'class-validator';

import { OvertimeLog } from '../entities/overtime-log.entity';

export class IndexOvertimeLogDto extends IndexDto<OvertimeLog> {}

export class ShowOvertimeLogDto extends ShowDto {}

export class DeleteOvertimeLogDto extends DeleteDto {}

export class CreateOvertimeLogDto {}

export class UpdateOvertimeLogDto extends PartialType(CreateOvertimeLogDto) {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;
}

export class FindOvertimeLogDto extends PartialType(UpdateOvertimeLogDto) {}

export class SwitchOvertimeLogDto {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;

  @ApiProperty({ description: '状态' })
  @IsNotEmpty({ message: '状态不能为空' })
  @IsBoolean()
  status: boolean;
}

export class ImportOvertimeLogDto {}

export class ExportOvertimeLogDto {}

export class CountOvertimeLogDto {
  dingId: string;
}

export class SyncOvertimeLogDto {
  date: string;
}
